import { Base } from "./base";
import myAxios from "@/utils/request";

class Account extends Base {
  constructor(url) {
    super(url);
  }

  // 获取快递公司列表
  getCompanyCodeInfo() {
    return myAxios.request({
      url: this.url + `/getCompanyCodeInfo`,
      method: "get",
    });
  }

  //获取二维码
  getQRCode(params) {
    return myAxios.request({
      url: this.url + `/getQRCode`,
      method: "post",
      data:params
    });
  }

  //下载文件
  getExport(params) {
    return myAxios.request({
      url: `${this.url}/export`,
      method: 'post',
      data: params,
      responseType: 'blob'
    })
  }

  //运单查询
  select(params) {
    return myAxios.request({
      url: this.url + `/select`,
      method: "post",
      data:params
    });
  }
}

export const AccountApi = new Account(""); // 用户
